package com.foreveross.bsl.mdm.ios.cmds;

import com.foreveross.bsl.mdm.ios.IosCommand;

/**
 * @description 设备锁定指令 
 *
 * @author heyaowen
 * @version v1.0
 *
 * @2014-7-21
 *
 */
public class DeviceLockCommand extends IosCommand {
	// The Find My Mac PIN. Must be 4 or 6 characters long.
	// Note that this field is provided only for OS X, not
	// iOS.
	private String pin;
	
	// Optional. If provided, this message is displayed
	// on the lock screen. Available in iOS 7 and later.
	private String message; 
	
	// Optional. If provided, this phone number is
	// displayed on the lock screen. Available in
	// iOS 7 and later.
	private String phoneNumber; 

	public void executeBefore() {
		getCommand().put("RequestType", IosCommand.COMMAND_DEVICE_LOCK);
	}

	@Override
	public void doExecute() {
		if(pin != null)
			getCommand().put("PIN", pin);
		if (message != null)
			getCommand().put("Message", message);
		if (phoneNumber != null)
			getCommand().put("PhoneNumber", phoneNumber);
	}

	public void setPin(String pin) {
		this.pin = pin;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}
}
